import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager as fm

# 网格线

ypoints = np.array([1, 3, 4, 5, 8, 9, 6, 1, 3, 4, 5, 2, 4])

plt.plot(ypoints)
# plt.grid()  # 网格线
plt.grid(axis='y')  # 只在y轴显示网格线
plt.show()
